package com.polaris.live.common.mvvm.ext
/**
 * 判断是否为空，并传入相关操作
 *
 * @author Created by 半仙 on 2023/7/31/031 15:15
 */
inline fun <reified T> T?.notNull(notNullAction: (T) -> Unit, nullAction: () -> Unit = {}) {
    if (this != null){
        notNullAction.invoke(this)
    }else{
        nullAction.invoke()
    }
}